home *** CD-ROM | disk | FTP | other *** search
/ Interactive Preview: Enemy of the State / Interactive Preview: Enemy of the State.iso / pc / alrtthis.dxr / 00079.ls < prev    next >
Encoding:
Text File  |  1998-11-18  |  2.0 KB  |  71 lines

  1. on exitFrame
  2.   go(the frame)
  3. end
  4.  
  5. on keyDown
  6.   case the key of
  7.     TAB:
  8.       doTabThang()
  9.     ENTER, RETURN:
  10.       doDefaultButton()
  11.   end case
  12. end
  13.  
  14. on doTabThang
  15.   global gDefaultButton
  16.   if the memberNum of sprite 2 = the number of member "lrg def btn" then
  17.     if the visible of sprite 4 = 1 then
  18.       set the memberNum of sprite 4 to the number of member "sml def btn"
  19.       set the memberNum of sprite 2 to the number of member "lrg btn"
  20.       set gDefaultButton to "2"
  21.       updateStage()
  22.       exit
  23.     else
  24.       if the visible of sprite 6 = 1 then
  25.         set the memberNum of sprite 6 to the number of member "sml def btn"
  26.         set the memberNum of sprite 2 to the number of member "lrg btn"
  27.         set gDefaultButton to "3"
  28.         updateStage()
  29.         exit
  30.       end if
  31.     end if
  32.   else
  33.     if the memberNum of sprite 4 = the number of member "sml def btn" then
  34.       if the visible of sprite 6 = 1 then
  35.         set the memberNum of sprite 6 to the number of member "sml def btn"
  36.         set the memberNum of sprite 4 to the number of member "sml btn"
  37.         set gDefaultButton to "3"
  38.         updateStage()
  39.         exit
  40.       else
  41.         set the memberNum of sprite 2 to the number of member "lrg def btn"
  42.         set the memberNum of sprite 4 to the number of member "sml btn"
  43.         set gDefaultButton to "1"
  44.         updateStage()
  45.         exit
  46.       end if
  47.     else
  48.       if the memberNum of sprite 6 = the number of member "sml def btn" then
  49.         set the memberNum of sprite 2 to the number of member "lrg def btn"
  50.         set the memberNum of sprite 6 to the number of member "sml btn"
  51.         set gDefaultButton to "1"
  52.         updateStage()
  53.         exit
  54.       end if
  55.     end if
  56.   end if
  57. end
  58.  
  59. on doDefaultButton
  60.   global gDefaultButton
  61.   set cmd to the text of member ("AskCmd" & gDefaultButton)
  62.   tell the stage
  63.     closeAlertWin()
  64.   end tell
  65.   set btnName to the text of member ("AskBtn" & gDefaultButton)
  66.   tell the stage
  67.     do(cmd)
  68.     return btnName
  69.   end tell
  70. end
  71.